package com.coreJava.设计模式.观察者模式;

import java.util.Vector;

/**
 * 作者: LCG
 * 日期: 2020/2/13 23:09
 * 描述:
 */
public abstract class TestZhuLeiAbstract implements ZhuLeiInterface{

    private Vector<TestGUanCheZhe> vector=new Vector<>();

    @Override
    public void add(TestGUanCheZhe testGUanCheZhe) {
        vector.add(testGUanCheZhe);
    }

    @Override
    public void del(TestGUanCheZhe testGUanCheZhe) {
        vector.remove(testGUanCheZhe);
    }

    @Override
    public void tongzhiAll() {

        vector.forEach(yyy->{
            yyy.guancha();
        });

    }

}
